package com.wc.AlgoOJ.DS0104;



import java.io.*;
import java.util.*;


/**
 * @Author congge
 * @Date 2023/12/11 10:01
 * 排队买票
 * http://43.138.190.70:8888/p/DS0104
 * @description
 */
public class Main {
    static StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));

    public static void main(String[] args) {
        int n = nextInt();
        // 队列
        Queue<Pair> queue = new LinkedList<>();
        int[] ans = new int[n + 1];
        for (int i = 1; i <= n; i++) {
            Pair pair = new Pair();
            pair.first = nextInt();
            pair.second = i;
            queue.add(pair);
        }

        // 当前时间
        int curTime = 0;
        // 当队列中没有人了就结束
        while (!queue.isEmpty()) {
            // 迭代器
            Iterator<Pair> it = queue.iterator();

            // 走迭代器
            while (it.hasNext()) {
                Pair pair = it.next();
                curTime++;
                pair.first--;
                // 当前值为0
                if (pair.first == 0) {
                    // 记录时间
                    ans[pair.second] = curTime;
                    // 走出去
                    it.remove();
                }
            }
        }
        // 记录答案
        StringBuffer ansStr = new StringBuffer();
        ansStr.append(ans[1]);
        for (int i = 2; i <= n; i++) {
            ansStr.append(' ');
            ansStr.append(ans[i]);
        }
        System.out.println(ansStr);
    }

    static class Pair{
        // 当前位置的值
        int first;
        // 当前位置坐标
        int second;
    }

    public static int nextInt() {
        try {
            in.nextToken();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return (int) in.nval;
    }
}
